package com.sos.widget.view.recyclerview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.sos.widget.view.MyRecyclerView;

/**
 * @Description
 * @Author 梁浩文
 * @Date 2022/11/29 9:12
 */

public class TouchRecyclerView extends MyRecyclerView {
    public TouchRecyclerView(Context context) {
        super(context);
    }

    public TouchRecyclerView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        //通知父层ViewGroup不要拦截点击事件
        getParent().requestDisallowInterceptTouchEvent(true);
        return super.dispatchTouchEvent(ev);
    }
}
